//创建单位
params ["_type", "_pos", "_level", "_group"];



private _unit = _group createUnit [_type, _pos, [], 100, "NONE"];
[_level, _unit]call fn_setSkill;
[_unit, _level] call fn_initUnit;



//切换到主武器
_unit action ["SwitchWeapon", _unit, _unit, -1];


_unit